/**
 * 客户流失录入回访结果查询
 *
 * @Author: 崔梦超
 * @Date: 2019/9/3
 */
import axios from '@/api/fetch';
import SERVER from '@/api/server';

// 品牌 - 下拉框
export const getBrandSelect = params =>
  axios.get(`/api/basedata/vehicleProduct/brandsqueryall`, {
    params
  });
// 车系 - 下拉框
export const getSeriesSelect = (id, params) =>
  axios.get(`/api/basedata/vehicleProduct/brandsdict/${id}/seriessdict`, {
    params
  });
// 车型 - 下拉框
export const getModelSelect = (brandId, id, params) =>
  axios.get(`/api/basedata/vehicleProduct/brandsdict/${brandId}/seriessdict/${id}/modelsdict`, {
    params
  });

// 页面主查询
export const getCustomerLossResult = params => axios.get(`${SERVER.DMSCLOUD_CUSTOMERREPAIR}/customer/lossResult/findAll`, { params });

// 获取跟踪员下拉框
export const getTrackerSelect = params => axios.get(`${SERVER.DMSCLOUD_CUSTOMERREPAIR}/customer/lossResult/queryTrackerSelect`, { params });

// 获取录入人下拉框
export const getInputerSelect = params => axios.get(`${SERVER.DMSCLOUD_CUSTOMERREPAIR}/customer/lossResult/queryInputerSelect`, { params });

// 获取经销商下拉框信息
export const getDealerSelect = params => axios.get(`${SERVER.DMSCLOUD_REPAIR}/customer/lossResult/queryDealerSelect`, { params });

// 流失回访回访结果导出
export const getCustomerLossQueryExcelList = params =>
  axios.get(`${SERVER.DMSCLOUD_CUSTOMERREPAIR}/customer/lossResult/getCustomerLossQueryInfo/export/excel`, { params, responseType: 'arraybuffer' });
